package com.wangdao.wechatmall.service.wx;

import com.wangdao.wechatmall.bean.bo.wx.*;
import com.wangdao.wechatmall.bean.pojo.Coupon;
import com.wangdao.wechatmall.bean.vo.wx.CartIndexVo;
import com.wangdao.wechatmall.bean.vo.wx.WXCartCheckOutVO;
import com.wangdao.wechatmall.bean.vo.wx.WXCartIndexVO;
import com.wangdao.wechatmall.exception.CouponUnusbaleException;

import java.util.List;

/**
 * @ClassName: WXCartService
 * @Description ${DESCRIPTION}
 * @Author Xinhao Yi
 * @Date 2021/7/11  21:18
 */
public interface WXCartService {

    //如果onlyChecked未true，表示只查找已选中的，为false则都查找
    WXCartIndexVO list(Boolean onlyChecked);

    //firstAdd时使用，去拿单独的一个cart，并组装返回结果
    WXCartIndexVO list(Integer firstAddCartId, Boolean onlyChecked);

    Boolean checked(WXCartCheckedBO param);

    Integer update(WXCartUpdateBO param);

    Integer delete(WXCartDeleteBO param);

    Integer add(WXCartAddBO param,Boolean isFastAdd);

    Integer countTotalGoodsNum();

    Integer countTotalCartsNum();

    Integer removeCartByCartId(Integer cardId);

    WXCartCheckOutVO getCheckOutVO(WXCartCheckOutBO param, WXCartIndexVO wxCartIndexVO);

    List<Coupon> queryAvailableCouponList(Integer userId, WXCartIndexVO cartInfo, Integer couponId);

    WXCartIndexVO queryCartIndex(Integer id, Integer cartId, Boolean onlyChecked);

    WXCartCheckOutVO queryCartCheckoutInfo(Integer checkoutBo, WXCartCheckOutBO bo, WXCartIndexVO cartCheckedList);

//    CartCheckoutVo queryCartCheckoutInfo(Integer checkoutBo, CartCheckoutBo bo, CartIndexVo cartCheckedList);

}
